***********************************************************************************************
***
***	INTERTEMPORAL EVIDENCE ON THE STRATEGY OF POPULISM IN THE US (Gennaro, Lecce, Morelli)
***	Replication Package
***  
*** Appendix - Table A17
***
***********************************************************************************************



clear
est clear 

* Indicate location of the replication package here
cd "/Replication Package"



clear
est clear 
use "3_data/for_analysis/presidential_election_complete.dta", clear

egen mch_s = std(mch)
egen pop_dim2_s = std(pop_dim2)

eststo m1: reg pop_dim2_s i.trump##c.mch_s##i.swing i.mcode length administration-welfare, cluster(MSANAME)
eststo m2: reg pop_dim2_s i.trump##c.mch_s##i.swing i.mcode length economy pol_inst, cluster(MSANAME)



** Congress
use "3_data/for_analysis/congress_election_both", clear

keep if uncont==0 & indep==0
global controls "female i.age_cat_num i.ethnicity2 i.educ_cat len_words i.election_year"

eststo m3: areg pop_dim2_s i.outsider_correct##i.competitivedistricts##c.econ $controls administration - education_top, a(state) cluster(district)
eststo m4: areg pop_dim2_s i.outsider_correct##i.competitivedistricts##c.econ $controls economy pol_inst social, a(state) cluster(district)


esttab m1 m2 m3 m4 using "4_results/tables/tabA17.tex", f label replace booktabs alignment(D{.}{.}{-1}) ///
s(N r2, fmt(0 2) label("Observations" "R-squared")) ///
nomtitles star(* 0.10 ** 0.05 *** 0.01) r2 b(3) se(3) brac nonotes


